<template>
	<view class="my-search-container" :style="{'background-color':bgColor }">
		<!-- 自定义组件搜索组件 -->
		<view @click="gotoSearch" 
		class="my-search-box" 
		:style="{'border-radius':radius+'px'} ">
		
			<uni-icons type="search" size="17" ></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
			props:{
				bgColor:{
					type: String,
					default:'#c00000'
				},
				radius: {
					type: Number,
					default:18
					
				}
			},
		name:"my-search",
		data() {
			return {
				
			};
		},
		methods:{
			gotoSearch(){
				this.$emit('myclick');
				// console.log("=====")
			},
		}
	}
</script>

<style lang="scss">
.my-search-container {
	// text-align: center;
	height: 45px;
	display: flex;
	justify-content:center ;
	// background-color: #c00000;
}
.my-search-box {
	width: 95%;
	height: 35px;
	background-color: #FFFFFF;
	text-align: center;
	margin: 0 auto;
	margin-top: 2.5px;
	// border-radius: 20px;
}
.placeholder {
	// margin-top: 5px;
	line-height: 35px;
	font-size: 15px;
}
</style>
